#include<stdio.h>

int main()
{
    int n, a, b, c;
    double m;
    
    scanf("%d", &n) ;
    while(n != 0)
    {
        
        a = 0, b = 0, c = 0;
        for(int i = 1; i <= n; i ++)
        {
            scanf("%lf ", &m);
            if(m > 0) c ++;
            else if(m == 0) b ++;
            else if(m < 0) a ++;
        }
        printf("%d %d %d\n", a, b, c);
        scanf("%d", &n);
    }
    
    return 0;
}